package Utils;

import java.util.Date;

import com.idfsgm.SharedPref;

import datatypes.DutyDate;
import datatypes.Soldier;
import datatypes.Team;

public class SavingAndLoadingCenter {

	public static Team loadTeam() {

		Team team = new Team();
		Soldier s1 = new Soldier("1", "a");
		Soldier s2 = new Soldier("2", "b");
		Soldier s3 = new Soldier("3", "c");
		Soldier s4 = new Soldier("4", "d");
		Soldier s5 = new Soldier("5", "e");
		Soldier s6 = new Soldier("6", "f");
		s1.setdPoints(10);
		s2.setdPoints(3);
		s3.setdPoints(22);
		s4.setdPoints(15);
		s5.setdPoints(60);
		s6.setdPoints(2);
		team.addSoldier(s1);
		team.addSoldier(s2);
		team.addSoldier(s3);
		team.addSoldier(s4);
		team.addSoldier(s5);
		team.addSoldier(s6);
		
		return team;

	}

	public static DutyDate loadDutyLimitHours(int dutyType) {
		Date startingDate = new Date();
		Date endingDate = new Date();
		switch(dutyType){
		case SharedPref.KithenDuty : {
			startingDate.setHours(7);
			endingDate.setHours(18);
			return new DutyDate(startingDate,endingDate);
		}
		
		case SharedPref.GuardDuty : {
			startingDate.setHours(23);
			endingDate.setHours(8);
			return new DutyDate(startingDate,endingDate);
		}
			 
		
		}
		return null;
	}

}
